﻿using ErrorOr;
using Gym.Domain.Common;
using Gym.Domain.Common.EventualConsistency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gym.Domain.SessionAggregate.Events
{
    public record ReservationCanceledEvent(Session session, Reservation reservation) : IDomainEvent
    {
        public static readonly Error ParticipantNotFound = EventualConsistencyError.From(
        code: "ReservationCanceledEvent.ParticipantNotFound",
        description: "Participant not found");

        public static readonly Error ParticipantScheduleUpdateFailed = EventualConsistencyError.From(
            code: "ReservationCanceledEvent.ParticipantScheduleUpdateFailed",
            description: "Removing session from participant schedule failed");
    }
}
